home *** CD-ROM | disk | FTP | other *** search
/ Java Primer Plus / Java Primer Plus (Waite Group Proess)(1996).iso / java_Win / README < prev   
Text File  |  1996-01-16  |  8KB  |  244 lines

  1.                  README: The Java Developers Kit
  2.  
  3.  
  4. This 1.0 release of the Java Developers Kit (JDK) lets you
  5. write applets that conform to the 1.0 Java applet API.  
  6.  
  7.  
  8. The JDK helps you to:
  9. ---------------------
  10.     - Develop applets that conform to the final applet API
  11.     - Create applets that run in all Java-enabled browsers
  12.     - Develop Java applications
  13.     - Experiment with the debugger API (and a prototype
  14.       command-line debugger)
  15.  
  16.  
  17. Supported platforms
  18. -------------------
  19. The JDK is available for SPARC Solaris, Windows NT, and Windows 95.
  20.   
  21.  
  22. The JDK contains:
  23. -----------------
  24.     - classes.zip
  25.         DO NOT UNZIP THIS FILE!  It is needed by the compiler and
  26.         interpreter.
  27.  
  28.     - src.zip
  29.                 This is a set of source files that may be unzipped if
  30.                 desired.  You can get a free copy of the correct version
  31.                 of unzip from ftp://ftp.uu.net/pub/archiving/zip/WIN32 .
  32.  
  33.     - Java Applet Viewer, 
  34.            for testing and running applets
  35.  
  36.     - Java Debugger API and Prototype Debugger,
  37.              an API (java.tools.debug) and early prototype
  38.              of a command-line debugger that uses the API
  39.  
  40.     - Java Compiler
  41.  
  42.     - Java Interpreter
  43.         
  44. NOTE: This release does NOT include a Web browser. 
  45.  
  46.  
  47. What is the final applet API?
  48. ------------------------------
  49. The final applet API consists of the following packages:  java.lang,
  50. java.util, java.io, java.net, java.awt, java.awt.peer, java.awt.image,
  51. and java.applet.  We and our partners are committed to supporting
  52. this API.
  53.  
  54.  
  55. ----------------------------------------------------------------------
  56. IMPORTANT: Please make sure you understand the Copyright and License
  57. information (in the file named COPYRIGHT) before using this release.
  58. ----------------------------------------------------------------------
  59.  
  60.  
  61. The rest of this document has the following sections:
  62.  
  63. - Where to find more information
  64. - Running applets with the Applet Viewer
  65. - The APPLET tag
  66. - Debugging programs with JDB
  67.  
  68.  
  69. Where to find more information
  70. ------------------------------
  71. This file is the only documentation included in this release.  The
  72. rest of the information you need is on our website:
  73.  
  74.     http://java.sun.com/JDK-1.0/
  75.  
  76. It includes the following:
  77.  
  78. - Frequently asked questions
  79. - Changes since the last release
  80. - Applet examples (some of which are in this release, as well)
  81. - API documentation 
  82. - Documentation for the Java programming tools (including java,
  83.   javac, and jdb)
  84. - The latest Java Language Specification 
  85. - Known bugs in the JDK 
  86.  
  87. If you have questions, problems, or comments:
  88.  
  89. 1. Check out the FAQ at:
  90.  
  91.     http://java.sun.com/JDK-1.0/faq.html
  92.  
  93. 2. Before filing a bug report, please check the known bugs at:
  94.  
  95.     http://java.sun.com/JDK-1.0/KnownBugs-JDK.html
  96.  
  97.    File bug reports following the instructions at:
  98.  
  99.     http://java.sun.com/GettingInTouch/BugReport.html
  100.  
  101. 3. The newsgroup comp.lang.java and the Java/HotJava mailing lists 
  102.    are active forums for posting questions and exchanging information 
  103.    with other Java users.  See http://java.sun.com/mail.html for 
  104.    information on accessing the newsgroup and mailing lists.
  105.  
  106. 4. Other questions can be sent to java@java.sun.com.
  107.  
  108.  
  109. Running applets with the Applet Viewer
  110. --------------------------------------
  111. Here are two examples of using the Applet Viewer:
  112.  
  113.   bin/appletviewer demo/GraphLayout/example1.html
  114.   bin/appletviewer http://java.sun.com/applets/applets/NervousText/example1.html 
  115.   (On the PC, use "bin\appletviewer" instead of "bin/appletviewer".)
  116.  
  117. The argument is a filename or URL that refers to an HTML file that
  118. contains one or more APPLET tags.  The Applet Viewer finds the APPLET
  119. tags in the HTML file and runs the applets as specified by the tags
  120. (in separate windows).
  121.  
  122.  
  123. The APPLET tag
  124. --------------
  125. The APP tag of previous releases is gone, replaced by the APPLET tag. 
  126. Here is an example of a simple APPLET tag:
  127.  
  128.   <applet code="MyApplet.class" width=100 height=140></applet>
  129.  
  130. This tells the viewer or browser to load the applet whose compiled
  131. code is in MyApplet.class (in the same directory as the current HTML
  132. document), and to set the initial size of the applet to 100 pixels
  133. wide and 140 pixels high.
  134.  
  135. Here's a more complex example of an APPLET tag:
  136.  
  137.   <applet codebase="http://java.sun.com/applets/applets/NervousText"
  138.     code="NervousText.class" width=400 height=75 align=center >
  139.   <param name="text" value="This is the Applet Viewer.">
  140.   <blockquote>
  141.   <hr>
  142.   If you were using a Java-enabled browser,
  143.   you would see dancing text instead of this paragraph.
  144.   <hr>
  145.   </blockquote>
  146.   </applet>
  147.  
  148. This tells the viewer or browser to load the applet whose compiled
  149. code is at the URL
  150. http://java.sun.com/applets/applets/NervousText/NervousText.class,
  151. to set the initial size of the applet to 400x75 pixels, and to align
  152. the applet in the center of the line.  The viewer/browser must also
  153. set the applet's "text" attribute (which customizes the text this
  154. applet displays) to be "This is the Applet Viewer."  If the page is
  155. viewed by a browser that can't execute Java applets, then the browser
  156. will ignore the APPLET and PARAM tags, displaying the HTML between
  157. the <blockquote> and </blockquote> tags.  Java-enabled browsers
  158. *ignore* that HTML.
  159.  
  160. Here's the complete syntax for the APPLET tag:
  161.  
  162.     '<' 'APPLET'
  163.         ['CODEBASE' '=' codebaseURL]
  164.         'CODE' '=' appletFile
  165.     ['ALT' '=' alternateText]
  166.     ['NAME' '=' appletInstanceName]
  167.     'WIDTH' '=' pixels 'HEIGHT' '=' pixels
  168.     ['ALIGN' '=' alignment]
  169.     ['VSPACE' '=' pixels] ['HSPACE' '=' pixels]
  170.     '>'
  171.     ['<' 'PARAM' 'NAME' '=' appletAttribute1 'VALUE' '=' value '>']
  172.     ['<' 'PARAM' 'NAME' '=' appletAttribute2 'VALUE' '=' value '>']
  173.     . . .
  174.     [alternateHTML]
  175.     '</APPLET>'
  176.  
  177. 'CODEBASE' '=' codebaseURL
  178.     This optional attribute specifies the base URL of the applet --
  179.     the directory that contains the applet's code.  If this attribute
  180.     is not specified, then the document's URL is used.
  181.  
  182. 'CODE' '=' appletFile
  183.     This required attribute gives the name of the file that contains
  184.     the applet's compiled Applet subclass.  This file is relative to
  185.     the base URL of the applet.  It cannot be absolute.
  186.     
  187. 'ALT' '=' alternateText
  188.     This optional attribute specifies any text that should be
  189.     displayed if the browser understands the APPLET tag but can't
  190.     run Java applets.
  191.  
  192. 'NAME' '=' appletInstanceName
  193.     This optional attribute specifies a name for the applet instance,
  194.     which makes it possible for applets on the same page to find (and
  195.     communicate with) each other.
  196.  
  197. 'WIDTH' '=' pixels 'HEIGHT' '=' pixels
  198.     These required attributes give the initial width and height (in
  199.     pixels) of the applet display area, not counting any windows or
  200.     dialogs that the applet brings up.  
  201.  
  202. 'ALIGN' '=' alignment
  203.     This required attribute specifies the alignment of the applet.
  204.     The possible values of this attribute are the same as those for
  205.     the IMG tag: left, right, top, texttop, middle, absmiddle,
  206.     baseline, bottom, absbottom.
  207.  
  208. 'VSPACE' '=' pixels 'HSPACE' '=' pixels
  209.     These option attributes specify the number of pixels above and
  210.     below the applet (VSPACE) and on each side of the applet (HSPACE).
  211.     They're treated the same way as the IMG tag's VSPACE and HSPACE
  212.     attributes.
  213.  
  214. '<' 'PARAM' 'NAME' '=' appletAttribute1 'VALUE' '=' value '>' . . .
  215.     This tag is the only way to specify an applet-specific attribute.
  216.     Applets access their attributes with the getParameter() method.
  217.  
  218.  
  219. Debugging programs with JDB
  220. ---------------------------
  221. This release contains the Java Debugger (JDB), an alpha-quality
  222. prototype of a command-line debugger for Java classes.  It is
  223. designed to test the Java Debugger API, which is in the package
  224. java.tools.debug.  We look forward to getting your feedback on
  225. the debugger API.
  226.  
  227. You can debug applets using the -debug option of appletviewer.
  228. When debugging applets, it's best to invoke appletviewer from
  229. the directory that contains the applet's HTML file.  For example,
  230. on Solaris:
  231.  
  232.     cd demo/TicTacToe
  233.     ../../bin/appletviewer -debug example1.html 
  234.  
  235. On the PC:
  236.  
  237.     cd demo\TicTacToe
  238.     ..\..\bin\appletviewer -debug example1.html 
  239.     
  240. You can find documentation on the debugger and its API at:
  241.  
  242.     http://java.sun.com/JDK-1.0/debugging/
  243.  
  244.